package gameEngine.agents.Logger.Massages;

import org.apache.log4j.Logger;

import gameEngine.game.TurnBasedScoredGame;
/**
 * Massage object for text logger use
 * @author alon
 *
 */
public class SimpleTextMassage implements Massage{

	String agentID;
	String score;
	TurnBasedScoredGame game;
	Logger log = Logger.getLogger(this.getClass());
	
	public SimpleTextMassage(TurnBasedScoredGame game) {
		super();
		this.game = game;
	}

	public String getAgentID() {
		return agentID;
	}

	public void setAgentID(String agentID) {
		this.agentID = agentID;
	}

	public String getScore() {
		return score;
	}

	public void setScore(String score) {
		this.score = score;
	}
	/**
	 * return Massage at the format:
	 * Turn x:  Agent:y has scored: z 
	 */
	public String getMassage() {
		String message="Turn "+game.getTurnNumber()+": Agent: "+agentID+" has scored: "+score;
		log.debug("message created: "+message);
		return  message; 
	}

	public void setContent(String agentID, String score) {
		setAgentID(agentID);
		setScore(score);
	}

}
